package br.com.firula.to;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="tipo_telefone")
@SequenceGenerator(name="SEQUENCE", sequenceName="tipo_telefone_seq")
@Inheritance(strategy=InheritanceType.JOINED)
public class TipoTelefoneTO extends BaseTO{

	private static final long serialVersionUID = -6924272731337402906L;

	@Id
	@Column(name="id", nullable=false)
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Long id;

	@Column(name="tipo", nullable=false)
	private String tipo;

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "tipoTelefone")
	private List<TelefoneTO> telefones;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTipo() {
		return tipo;
	}

	public void setTipo(String tipo) {
		this.tipo = tipo;
	}

	public List<TelefoneTO> getTelefones() {
		return telefones;
	}

	public void setTelefones(List<TelefoneTO> telefones) {
		this.telefones = telefones;
	}

	@Override
	public String getAbreviation() {
		// TODO Auto-generated method stub
		return null;
	}

}
